package edu.iwyf.pms.dao.sql;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.jdbc.SQL;

/**
 * @Author 王永飞
 * 2021/12/23 15:17
 */
public class PermissionSQL {

    public String selecttMenu(@Param(value = "roleList") final Integer[] roleList){
        return new SQL(){{
            SELECT("pm.id,name,url,icon,parentid,orderid,status,description");
            FROM("sys_permission pm");
            INNER_JOIN("sys_premission_role rpm");
            WHERE("status=1");
            for(Integer item:roleList){
                WHERE("roleid="+item);
            }
            ORDER_BY("orderid");
        }}.toString();
    }
}
